package com.ke.rule.template.impl;

import com.ke.rule.base.ApplicationServiceBase;
import com.ke.rule.base.OverwrittenFactory;
import com.ke.rule.domain.method.InContractSignImpl;
import com.ke.rule.dto.ContractSignRequest;
import com.ke.rule.dto.ContractSignResponse;
import com.ke.rule.template.IContractSignTemplate;
import com.fasterxml.jackson.core.type.TypeReference;
import org.springframework.stereotype.Service;

@Service
public class IContractSignTemplateImpl extends ApplicationServiceBase implements IContractSignTemplate {

    @Override
    public ContractSignResponse sign(ContractSignRequest signRequest) {
        InContractSignImpl callable = (InContractSignImpl) OverwrittenFactory
                .newMethodImpl(this, InContractSignImpl.class,
                        new TypeReference<ContractSignResponse>() {
                        }, signRequest);
        return callable.call();
    }
}
